<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template variable</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Histogram">
<link rel="up" href="../../../histogram/reference.html#header.boost.histogram.axis.variable_hpp" title="Header &lt;boost/histogram/axis/variable.hpp&gt;">
<link rel="prev" href="traits/width_as.html" title="Function template width_as">
<link rel="next" href="operator___idm15690.html" title="Function template operator==">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="traits/width_as.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../histogram/reference.html#header.boost.histogram.axis.variable_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator___idm15690.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.histogram.axis.variable"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template variable</span></h2>
<p>boost::histogram::axis::variable — Axis for non-equidistant bins on the real line. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../histogram/reference.html#header.boost.histogram.axis.variable_hpp" title="Header &lt;boost/histogram/axis/variable.hpp&gt;">boost/histogram/axis/variable.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> MetaData<span class="special">,</span> <span class="keyword">typename</span> Options<span class="special">,</span> 
         <span class="keyword">typename</span> Allocator<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="variable.html" title="Class template variable">variable</a> <span class="special">:</span> <span class="keyword">public</span> boost::histogram::axis::iterator_mixin&lt; variable&lt; Value, MetaData, Options, Allocator &gt; &gt;,
                 <span class="keyword">public</span> metadata_base_t&lt; MetaData &gt;
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="variable.html#boost.histogram.axis.variableconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="variable.html#idm15470-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="variable.html#idm15471-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="identifier">allocator_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> 
    <a class="link" href="variable.html#idm15474-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">It</span><span class="special">,</span> <span class="identifier">metadata_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">options_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
             <span class="identifier">allocator_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a class="link" href="variable.html#idm15503-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">It</span><span class="special">,</span> <span class="identifier">metadata_type</span><span class="special">,</span> <span class="identifier">allocator_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
    <a class="link" href="variable.html#idm15514-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">U</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">metadata_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">options_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
             <span class="identifier">allocator_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> <a class="link" href="variable.html#idm15539-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">U</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">metadata_type</span><span class="special">,</span> <span class="identifier">allocator_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
    <a class="link" href="variable.html#idm15548-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">U</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">metadata_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
             <span class="identifier">options_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">allocator_type</span> <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
    <a class="link" href="variable.html#idm15574-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">U</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">metadata_type</span><span class="special">,</span> <span class="identifier">allocator_type</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="variable.html#idm15583-bb"><span class="identifier">variable</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">index_type</span><span class="special">,</span> <span class="identifier">index_type</span><span class="special">,</span> <span class="keyword">unsigned</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="variable.html#idm15416-bb">public member functions</a></span>
  <span class="identifier">index_type</span> <a class="link" href="variable.html#idm15417-bb"><span class="identifier">index</span></a><span class="special">(</span><span class="identifier">value_type</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span> <span class="identifier">index_type</span><span class="special">,</span> <span class="identifier">index_type</span> <span class="special">&gt;</span> <a class="link" href="variable.html#idm15422-bb"><span class="identifier">update</span></a><span class="special">(</span><span class="identifier">value_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">value_type</span> <a class="link" href="variable.html#idm15426-bb"><span class="identifier">value</span></a><span class="special">(</span><span class="identifier">real_index_type</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">auto</span> <a class="link" href="variable.html#idm15431-bb"><span class="identifier">bin</span></a><span class="special">(</span><span class="identifier">index_type</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">index_type</span> <a class="link" href="variable.html#idm15436-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> V<span class="special">,</span> <span class="keyword">typename</span> M<span class="special">,</span> <span class="keyword">typename</span> O<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="variable.html#idm15439-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a><span class="special">&lt;</span> <span class="identifier">V</span><span class="special">,</span> <span class="identifier">M</span><span class="special">,</span> <span class="identifier">O</span><span class="special">,</span> <span class="identifier">A</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> V<span class="special">,</span> <span class="keyword">typename</span> M<span class="special">,</span> <span class="keyword">typename</span> O<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
    <span class="keyword">bool</span> <a class="link" href="variable.html#idm15449-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a><span class="special">&lt;</span> <span class="identifier">V</span><span class="special">,</span> <span class="identifier">M</span><span class="special">,</span> <span class="identifier">O</span><span class="special">,</span> <span class="identifier">A</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">auto</span> <a class="link" href="variable.html#idm15459-bb"><span class="identifier">get_allocator</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Archive<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="variable.html#idm15462-bb"><span class="identifier">serialize</span></a><span class="special">(</span><span class="identifier">Archive</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">unsigned</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="variable.html#idm15594-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keyword">unsigned</span> <a class="link" href="variable.html#idm15595-bb"><span class="identifier">options</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm29811"></a><h2>Description</h2>
<p>Binning is a O(log(N)) operation. If speed matters and the problem domain allows it, prefer a regular axis, possibly with a transform.</p>
<p>If the axis has an overflow bin (the default), a value on the upper edge of the last bin is put in the overflow bin. The axis range represents a semi-open interval.</p>
<p>If the overflow bin is deactivated, then a value on the upper edge of the last bin is still counted towards the last bin. The axis range represents a closed interval. This is the desired behavior for random numbers drawn from a bounded interval, which is usually closed.</p>
<p>
</p>
<div class="refsect2">
<a name="idm29817"></a><h3>Template Parameters</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Value</pre>
<p>input value type, must be floating point. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> MetaData</pre>
<p>type to store meta data. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Options</pre>
<p>see boost::histogram::axis::option. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Allocator</pre>
<p>allocator to use for dynamic memory management. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm29844"></a><h3>
<a name="boost.histogram.axis.variableconstruct-copy-destruct"></a><code class="computeroutput">variable</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="idm15470-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">default</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">explicit</span> <a name="idm15471-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="identifier">allocator_type</span> alloc<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> 
  <a name="idm15474-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="identifier">It</span> begin<span class="special">,</span> <span class="identifier">It</span> end<span class="special">,</span> <span class="identifier">metadata_type</span> meta <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
           <span class="identifier">options_type</span> options <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">allocator_type</span> alloc <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span></pre>Construct from iterator range of bin edges. <p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>allocator instance to use (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">begin</code></span></p></td>
<td><p>begin of edge sequence. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">end</code></span></p></td>
<td><p>end of edge sequence. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">meta</code></span></p></td>
<td><p>description of the axis (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">options</code></span></p></td>
<td><p>see boost::histogram::axis::option (optional). </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> 
  <a name="idm15503-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="identifier">It</span> begin<span class="special">,</span> <span class="identifier">It</span> end<span class="special">,</span> <span class="identifier">metadata_type</span> meta<span class="special">,</span> <span class="identifier">allocator_type</span> alloc<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a name="idm15514-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">U</span> <span class="special">&amp;</span> iterable<span class="special">,</span> <span class="identifier">metadata_type</span> meta <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
           <span class="identifier">options_type</span> options <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">allocator_type</span> alloc <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span></pre>Construct variable axis from iterable range of bin edges. <p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>allocator instance to use (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">iterable</code></span></p></td>
<td><p>iterable range of bin edges. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">meta</code></span></p></td>
<td><p>description of the axis (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">options</code></span></p></td>
<td><p>see boost::histogram::axis::option (optional). </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a name="idm15539-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">U</span> <span class="special">&amp;</span> iterable<span class="special">,</span> <span class="identifier">metadata_type</span> meta<span class="special">,</span> <span class="identifier">allocator_type</span> alloc<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a name="idm15548-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">U</span> <span class="special">&gt;</span> list<span class="special">,</span> <span class="identifier">metadata_type</span> meta <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> 
           <span class="identifier">options_type</span> options <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">,</span> <span class="identifier">allocator_type</span> alloc <span class="special">=</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span></pre>Construct variable axis from initializer list of bin edges. <p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>allocator instance to use (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">list</code></span></p></td>
<td><p><code class="computeroutput">std::initializer_list</code> of bin edges.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">meta</code></span></p></td>
<td><p>description of the axis (optional). </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">options</code></span></p></td>
<td><p>see boost::histogram::axis::option (optional). </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a name="idm15574-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">U</span> <span class="special">&gt;</span> list<span class="special">,</span> <span class="identifier">metadata_type</span> meta<span class="special">,</span> 
           <span class="identifier">allocator_type</span> alloc<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a name="idm15583-bb"></a><span class="identifier">variable</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a> <span class="special">&amp;</span> src<span class="special">,</span> <span class="identifier">index_type</span> begin<span class="special">,</span> <span class="identifier">index_type</span> end<span class="special">,</span> 
         <span class="keyword">unsigned</span> merge<span class="special">)</span><span class="special">;</span></pre>Constructor used by algorithm::reduce to shrink and rebin (not for users). </li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm30123"></a><h3>
<a name="idm15416-bb"></a><code class="computeroutput">variable</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">index_type</span> <a name="idm15417-bb"></a><span class="identifier">index</span><span class="special">(</span><span class="identifier">value_type</span> x<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Return index for value argument. </li>
<li class="listitem"><pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span> <span class="identifier">index_type</span><span class="special">,</span> <span class="identifier">index_type</span> <span class="special">&gt;</span> <a name="idm15422-bb"></a><span class="identifier">update</span><span class="special">(</span><span class="identifier">value_type</span> x<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">value_type</span> <a name="idm15426-bb"></a><span class="identifier">value</span><span class="special">(</span><span class="identifier">real_index_type</span> i<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Return value for fractional index argument. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">auto</span> <a name="idm15431-bb"></a><span class="identifier">bin</span><span class="special">(</span><span class="identifier">index_type</span> idx<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Return bin for index argument. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">index_type</span> <a name="idm15436-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Returns the number of bins, without over- or underflow. </li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> V<span class="special">,</span> <span class="keyword">typename</span> M<span class="special">,</span> <span class="keyword">typename</span> O<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="idm15439-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a><span class="special">&lt;</span> <span class="identifier">V</span><span class="special">,</span> <span class="identifier">M</span><span class="special">,</span> <span class="identifier">O</span><span class="special">,</span> <span class="identifier">A</span> <span class="special">&gt;</span> <span class="special">&amp;</span> o<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> V<span class="special">,</span> <span class="keyword">typename</span> M<span class="special">,</span> <span class="keyword">typename</span> O<span class="special">,</span> <span class="keyword">typename</span> A<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="idm15449-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="variable.html" title="Class template variable">variable</a><span class="special">&lt;</span> <span class="identifier">V</span><span class="special">,</span> <span class="identifier">M</span><span class="special">,</span> <span class="identifier">O</span><span class="special">,</span> <span class="identifier">A</span> <span class="special">&gt;</span> <span class="special">&amp;</span> o<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">auto</span> <a name="idm15459-bb"></a><span class="identifier">get_allocator</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return allocator instance. </li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Archive<span class="special">&gt;</span> <span class="keyword">void</span> <a name="idm15462-bb"></a><span class="identifier">serialize</span><span class="special">(</span><span class="identifier">Archive</span> <span class="special">&amp;</span> ar<span class="special">,</span> <span class="keyword">unsigned</span><span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm30288"></a><h3>
<a name="idm15594-bb"></a><code class="computeroutput">variable</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keyword">unsigned</span> <a name="idm15595-bb"></a><span class="identifier">options</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Returns the options. </li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Hans
      Dembinski<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="traits/width_as.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../histogram/reference.html#header.boost.histogram.axis.variable_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator___idm15690.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
